﻿<UserControl x:Class="personalplaner.gui.stamm.views.PersonAdditionalInfoView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c="clr-namespace:personalplaner.common.controls;assembly=personalplaner.common"
             xmlns:p="clr-namespace:personalplaner.gui.Properties" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1" Padding="5">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="130"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <TextBlock Text="Arbeitspensum in %" Grid.Row="0"/>
            <c:NumericTextBox Grid.Row="0" Grid.Column="1" DataContext="{Binding AdditionalInfoModel}" Text="{FocusBinding Path=Pensum, ValidatesOnDataErrors=True}"/>

            <TextBlock Text="Pensum von" Grid.Row="1"/>
            <DatePicker Grid.Row="1" Grid.Column="1" DataContext="{Binding AdditionalInfoModel}" SelectedDate="{FocusBinding Path=Von, ValidatesOnDataErrors=True}"/>

            <TextBlock Text="Pensum bis" Grid.Row="2"/>
            <DatePicker Grid.Row="2" Grid.Column="1" DataContext="{Binding AdditionalInfoModel}" SelectedDate="{FocusBinding Path=Bis, ValidatesOnDataErrors=True}"/>

            <TextBlock Text="Anstellung" Grid.Row="3"/>
            <ComboBox Grid.Row="3" Grid.Column="1"
                  DisplayMemberPath="Name"
                  ItemsSource="{Binding Anstellungen}"
                  SelectedItem="{Binding AdditionalInfoModel.Anstellung}"/>

            <TextBlock Grid.Row="4" Grid.ColumnSpan="2" Text="{x:Static p:Resources.PersonAdditionalInfoDescription}" TextWrapping="Wrap" Margin="0,20,0,0"/>

        </Grid>
    </Border>
</UserControl>
